import { Route } from '../decorator/router'
// let Route = require('../decorator/router')
// let resolve = require('path')
import { resolve } from 'path'

const r = path => resolve(__dirname, path)

export const router = app => {
  const apiPath = r('../routes')
  console.log(apiPath)
  const router = new Route(app, apiPath)

  // 加载router
  console.log('加载router')
  router.init()
}